//
//  TestMapView.m
//  ReactNativeDemo
//
//  Created by AceWei on 2017/8/20.
//  Copyright © 2017年 AceWei. All rights reserved.
//

#import "TestMapView.h"

@implementation TestMapView


- (instancetype)init
{
    self = [super init];
    if (self) {
        [self setupUI];
    }
    return self;
}


- (void)setupUI
{
//    MKMapView *map = [[MKMapView alloc] init];
    
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    [self addSubview:btn];
    
    [btn setTitle:@"button" forState:UIControlStateNormal];
    
    btn.backgroundColor = [UIColor purpleColor];
    
    btn.frame = CGRectMake(50, 80, 100, 70);
    
    [btn addTarget:self
            action:@selector(clickTap)
  forControlEvents:UIControlEventTouchUpInside];
}

- (void)clickTap
{
//    if (self.onClickBanner) {
//        self.onClickBanner(@{@"name": @"Ace"});
//    }
    
    
    if (self.onClick) {
        self.onClick();
    }
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
